package edu.pku.sei.modeler.editparts;

import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.tools.CellEditorLocator;

import edu.pku.sei.modeler.edit.parts.LabelDirectEditManager;
import edu.pku.sei.modeler.model.structure.MetaLink;
import edu.pku.sei.modeler.model.uml.BasicInteractions.Message;

public class MessageEditManager extends LabelDirectEditManager {
	 public MessageEditManager(GraphicalEditPart source, CellEditorLocator locator) {
	        super(source, locator);
	    }

	    @SuppressWarnings("unchecked")
	    protected String getInitialEditorText() {
	    	MetaLink editPart = (MetaLink) getEditPart().getModel();
	        return MessageParser.formatForEdit((Message) editPart.getModelElement());
	    }
}
